import createAPI from '@/plugins/axios'
const asyncUser = {
  list: config => createAPI('user/list', 'post', config),
  updateEnableds: config => createAPI('/user/updateEnableds', 'post', config),
  delete: config => createAPI('user/delete', 'post', config),
  queryList: config => createAPI('role/queryList', 'post', config),
  add: config => createAPI('user/add', 'post', config),
  update: config => createAPI('user/update', 'post', config),
  get: config => createAPI('user/get', 'post', config)
}

const asyncRole = {
  list: config => createAPI('role/list', 'post', config),
  getRoleRight: config => createAPI('role/getRoleRight', 'post', config),
  add: config => createAPI('role/add', 'post', config),
  update: config => createAPI('role/update', 'post', config)
}
const asyncAuthor = {
  grantAuthorization: config => createAPI('apiService/grantAuthorization', 'post', config)
}
export { asyncUser, asyncRole, asyncAuthor }
